<a
    href="#modal-generate-pull-request"
    id="btn-generate-pull-request"
    class="btn"
    data-toggle="modal"
    {{^ can_create_pull_request }}
        disabled
        title="{{ pull_request_can_not_be_created }}"
    {{/ can_create_pull_request }}
>
    <i class="icon-code-fork icon-rotate-270"></i> {{ new_pull_request_button_title }}
</a>

{{# can_create_pull_request }}
    <div class="modal hide fade" id="modal-generate-pull-request">
        <form action="{{ form_action }}" method="post" class="form-horizontal">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3><i class="icon-code-fork icon-rotate-270"></i> {{ new_pull_request_modal_title }}</h3>
            </div>

            <div class="modal-body">
                <div class="form-group">
                    <label for="field-select-id">{{ new_pull_request_modal_from }}</label>
                    <select name="branch_src">
                        <option value="" disabled="disabled" selected="selected">{{ new_pull_request_modal_choose_branch_from }}</option>
                        {{# src_branches }}
                            <option value="{{ . }}">{{ . }}</option>
                        {{/ src_branches }}
                    </select>
                </div>
                <div class="form-group">
                    <label for="field-select-id">{{ new_pull_request_modal_to }}</label>
                    <select name="branch_dest">
                        <option value="" disabled="disabled" selected="selected">{{ new_pull_request_modal_choose_branch_to }}</option>
                        {{# dest_branches }}
                            <option value="{{ repo_id }}:{{ branch_name }}">{{# repo_name }} {{ repo_name }} : {{/ repo_name }} {{ branch_name }}</option>
                        {{/ dest_branches }}
                    </select>
                </div>
            </div>

            <div class="modal-footer">
                {{{ csrf_input }}}
                <button class="btn" data-dismiss="modal" aria-hidden="true">{{ new_pull_request_modal_close }}</button>
                <button type="submit" class="btn btn-primary" name="generate-pull-request">{{ new_pull_request_modal_submit }}</button>
            </div>
        </form>
    </div>
{{/ can_create_pull_request }}